package org.rambadger.command;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.yammer.dropwizard.config.Configuration;
import org.hibernate.validator.constraints.NotEmpty;
import org.rambadger.command.axon.MongoConfiguration;

import javax.validation.Valid;
import javax.validation.constraints.NotNull;

/**
 * CBW: Write me.
 *
 * @author Chris Wash <a href="mailto:chris.wash@gmail.com">chris.wash@gmail.com</a>
 */
public class CommandConfiguration extends Configuration {
    @Valid @NotNull @JsonProperty
    private MongoConfiguration database = new MongoConfiguration();

    @Valid @NotNull
    @JsonProperty
    private UploadConfiguration upload = new UploadConfiguration();

    @Valid @NotEmpty
    @JsonProperty private String authCookieName = "ram_badger_auth";

    public MongoConfiguration getDatabaseConfiguration() {
        return database;
    }

    public UploadConfiguration getUploadConfiguration() {
        return upload;
    }

    public String getAuthCookieName() {
        return authCookieName;
    }
}

